
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:fristflutter/src/framework/counter_bloc.dart';

class AppBlocProvider extends StatefulWidget {
  final Widget child;

  const AppBlocProvider({required this.child, Key? key}) : super(key: key);

  @override
  State<StatefulWidget> createState() => _AppBlocProviderState();
}

class _AppBlocProviderState extends State<AppBlocProvider> {
  @override
  Widget build(BuildContext context) {
    return MultiBlocProvider(
      providers: [BlocProvider<CounterBloc>(create: (_) => CounterBloc())],
      child: widget.child,
    );
  }
  
  @override
  void dispose() {
    /// todo
    super.dispose();
  }
}
